<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>NaN</title>
</head>
<body>

</body>
<script>
    console.log(typeof NaN)  // number
    console.log(NaN !== NaN) // true

   // 1、 isNaN()
    console.log(isNaN(null));            //false
    console.log(isNaN(true));            //false
    console.log(isNaN(false));           //false
    console.log(isNaN(0));               //false
    console.log(isNaN(undefined));       //true
    console.log(isNaN("AB"));            //true
    console.log(isNaN({a: 1}));          //true
    console.log(isNaN(NaN));             //true

    // 2、Number.isNaN()
    console.log(Number.isNaN(null));      //false
    console.log(Number.isNaN(true));      //false
    console.log(Number.isNaN(false));     //false
    console.log(Number.isNaN(0));         //false
    console.log(Number.isNaN(undefined)); //false
    console.log(Number.isNaN("AB"));      //false
    console.log(Number.isNaN({a: 1}));    //false
    console.log(Number.isNaN(NaN));       //true
</script>
</html>
